ScriptSaver 2.0.1
Matthew M. Swann
swannman@mac.com

ScriptSaver is a screen saver module which executes an AppleScript of your choosing when it activates.. you could use it to refresh a folder, log out a user, empty the trash, or relaunch an application.  It's limited only by what you come up with!

To install ScriptSaver, drag ScriptSaver.saver to the Screen Savers folder inside the Library folder in your home folder.  If there is no Screen Savers folder inside your Library folder, then make a new folder there titled "Screen Savers" (without the quotes) and drag ScriptSaver.saver into it.  

To configure ScriptSaver, select it from the Screen Effects control pane in System Preferences, and click the "Configure" button.  Next, click the "Choose..." button and select the AppleScript you'd like to execute when the screen saver activates.  Please note that your AppleScript must have the file extension .scpt or .applescript to be chosen in the open panel.  Configure the activation time for your screensaver in the "Activation" tab of the Screen Effects preference pane.  Now, close System Preferences and your AppleScript will be executed at the time you designated.

One sample AppleScript has been provided in the "Sample Scripts" folder, which will log out the current user when ScriptSaver activates.  To use it, select it in the Configure panel of ScriptSaver.  Keep in mind that you can execute shell scripts from within AppleScript, as well.

The slider marked "Opacity" will allow you to change the way that ScriptSaver affects the screen when it activates: set to "Opaque", it will turn the screen black; set to "Transparent", it will let the screen show through.  This may be useful if you want to keep a computer lab set so that each computer looks awake and ready to go, but would still like to run an AppleScript to empty the trash or remount a network drive after a specified period of inactivity.

Finally, and arguably best, the "Screen Saver" pop-up menu allows you to choose a screen saver to run after the AppleScript is launched.  This screen saver inherits the opacity settings we discussed above-- please note that running an OpenGL screensaver in a transparent window at millions of colors will slow things down considerably.  However, if you choose to do so, remember that I warned you!

Please send comments, suggestions, criticism, and helpful ideas to me at the email address noted above.  I really do appreciate it!  I'd like to add a user-specified delay to the AppleScript, as well as space for a message or a countdown timer to be shown on-screen before the AppleScript activates.  I don't know when that will get done, but it's floating around the back of my mind.

Thanks to Fergal Mohan and Steve Crozier for the wonderful idea, and for prompting me to make something better and much more flexible than LogOut was ever designed to be.  Thanks also go to Greg Thompson for the idea of keeping the screen transparent when ScriptSaver activates, and to Michel Fortin (author of BlackLight) for showing me how to accomplish that.  Thanks very much!

Changelog:

Version 1.0:	Initial release

Version 1.1:	Added "Opacity" slider

Version 2.0:	Rehashed configuration panel
		Added support for running a screen saver inside ScriptSaver

Version 2.0.1:  Added a link to Frank Vogelskamp's excellent iTunes Screensaver script